var AipSpeechClient = require("baidu-aip-sdk").speech;

import config from '../../config';

const { appid, apikey, secretkey } = config.baidu;

var client = new AipSpeechClient(appid, apikey, secretkey);

/**
 * 百度相关处理
 */
export default class Baidu {

    public static async text2audio(text) {
        const result = await client.text2audio(text);
        return result.data;
    }
}